home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGSCAL / TBUTIL2.LZH / DOWN.PAS < prev    next >
Pascal/Delphi Source File  |  1984-09-07  |  994b  |  51 lines

  1. var
  2.   f1, f2 : text;
  3.   i,j    : integer;
  4.   a      : string[200];
  5.   c      : char;
  6.  
  7.  
  8. procedure skip_to_quote;
  9. begin
  10.   i:= i+1;
  11.   while not (a[i] in [#13,#34]) do  i:= i+1;
  12.   if a[i] = #34 then i:= i+1;
  13. end;
  14.  
  15.  
  16. procedure skip_to_end;
  17. begin
  18.   i:= i+1;
  19.   while (a[i] <> #13) do  i:= i+1;
  20. end;
  21.  
  22.  
  23. begin
  24.   assign(f1,'pcvis5.bas');
  25.   assign(f2,'pcvis5.pas');
  26.   reset(f1);rewrite(f2);
  27.   readln(f1,a);
  28.   i:= 0; j:= 1;
  29.   repeat
  30.     i:= i + 1;
  31.     if (a[i] in ['A'..'Z','a'..'z']) then
  32.        a[i]:= chr(ord(upcase(a[i]))+32)
  33. {    else
  34.       if not (a[i] in [#34,#39,#13]) then i:= i+1}
  35.     else
  36.       begin
  37.         if a[i] = #34 then skip_to_quote;
  38.         if a[i] = #39 then skip_to_end;
  39.         if a[i] = #13 then
  40.           begin
  41.             writeln(f2,a);
  42.             readln(f1,a);
  43.             i:= 0;
  44.             gotoxy(4,4);
  45.             writeln(j:4);
  46.             j:= j+1;
  47.           end;
  48.       end; { else }
  49.   until eof(f1);
  50.   close(f1);close(f2);
  51. end.